package com.taptech.doufu.ui.activity.weex;

import android.content.Context;

import com.taptech.doufu.services.personalcenter.AccountService;

import java.util.HashMap;

/**
 * Created by Wyatt on 2017/12/20/020.
 */

public class StartWeexActivityUtils {
    /**
     * 跳转到私信列表
     * @param context
     * @param toUid
     * @param toUserName
     */
    public static void startPrivateMsgActivity(Context context,String toUid, String toUserName) {
        HashMap<String, String> map = new HashMap<>();
        map.put("fromUid",AccountService.getInstance().getUserUid());
        map.put("toUid", toUid);
        map.put("toUserName", toUserName);
        SimpleWeexActivity.startActivity(context,"vue/privateMessage/TFPrivateMessage.js",map);
    }

    public static void startPrivateMsgActivity(Context context,String toUid, String toUserName,int flag) {
        HashMap<String, String> map = new HashMap<>();
        map.put("fromUid",AccountService.getInstance().getUserUid());
        map.put("toUid", toUid);
        map.put("toUserName", toUserName);
        SimpleWeexActivity.startActivity(context,"vue/privateMessage/TFPrivateMessage.js",map,flag);
    }

    public static void startBookListInfoActivity(Context context,String id){
        HashMap<String, String> map = new HashMap<>();
        map.put("id", id);
        SimpleWeexActivity.startActivity(context,"vue/booklist/TFBookListInfo.js",map);
    }

    public static void startRecommendBookListActivity(Context context,String requestUrl){
        HashMap<String, String> map = new HashMap<>();
        map.put("url", requestUrl);
        SimpleWeexActivity.startActivity(context,"vue/booklist/TFRecommendBookList.js",map);
    }
}
